<style>
    a{
        cursor: pointer;
    }
    table tr > th, table tr > td {
        text-align: center;
        vertical-align: middle !important;
    }
</style>
{% if detailArr is not defined %}
    <table class="table table-hover" nodeId="{{ detail['id'] }}" month="{{ detail['month'] }}" schoolId="{{ detail['schoolId'] }}" >
        <tbody>
        <tr class="info">
            <th style="width: 160px;">类型</th>
            <th style="width: 80px;">最大得分</th>
            <th style="width: 130px;">数据</th>
            <th style="width: 60px;">原始分</th>
            <th style="width: 50px;">得分</th>
            <th>操作</th>
        </tr>
        {% if detail is defined %}
            {% for key,row in detail['nodes'] %}
                <tr>
                    {% if row['sTag'] == 'tchUse' or row['sTag'] == 'runExamine' or row['sTag'] == 'activity' or row['sTag'] == 'tchShare' or row['sTag'] == 'exCase' or row['sTag'] == 'runCase'%}
                        <td sTag="{{ row['sTag'] }}" title="{{ row['mStandard'] }}">{% if row['bLock'] == 1  %}<i class="fa fa-lock"></i>{% endif %}<a style="float:left;" class="clickable" nodeId ="{{ row['iSSNId'] }}">&nbsp;&nbsp;<i class="glyphicon glyphicon-new-window	"></i>&nbsp;{{ row['sName'] }}</a></td>
                    {% else %}
                        <td sTag="{{ row['sTag'] }}" title="{{ row['mStandard'] }} ">{% if row['bLock'] == 1 %}<i class="fa fa-lock"></i>{% endif %}<span style="float:left;">&nbsp;&nbsp;{{ row['sName'] }}</span></td>
                    {% endif %}
                    <td>{{ row['iMaxGrade'] }}</td>
                    <td>{{ row['sRealData'] }}</td>
                    <td>{{ row['iCopyGrade'] }}</td>
                    <td id="grade_{{ row['iSSNId'] }}">{{ row['iGrade'] }}</td>
                    <td>
                        {% if row['bLock'] == 1 and (hasPower or isAdmin ) %}
                            <a class="unlock" nodeId="{{ row['iSSNId'] }}">解锁</a>
                        {% else %}
                            {% if hasPower %}
                                <a class="fix" nodeId="{{ row['iSSNId'] }}">修改</a> <a class="lock" nodeId="{{ row['iSSNId'] }}">锁定</a>
                            {% endif %}
                        {% endif %}
                    </td>
                </tr>

            {% endfor %}
            <tr>
                <td><span style="float: left">&nbsp;&nbsp;总分</span></td>
                <td colspan="3">{{ detail['totalGrade'] }}</td>
                <td colspan="2">{% if isAdmin or hasPower %}<a id="lockAll">&nbsp;&nbsp;一键锁定</a>{% endif %}</td>
            </tr>
            {% if lastTime is defined %}
                <tr>
                    <td colspan="6" style="font-size: 12px;text-align: right;padding-right: 10px;">截止时间：{{ lastTime }}</td>
                </tr>
            {% endif %}
        {% endif %}

        </tbody>
    </table>
{% else %}
    <div class="smart-widget widget-dark" style="height: 760px;width: 100%;margin-bottom: 0px;border-top: 1px solid #e6e6e6;overflow-y: hidden">
        <div class="smart-widget-inner" style="height: 100%;width: 100%; background-color:#f5f5f5" >
            <div  class="widget-tab clearfix">
                <ul class="tab-bar" >
                    {% for i,title in tabArr %}
                        <li {% if loop.first %}class="active" {% endif %}><a title="{{ title }}" href="#style3Tab{{ i }}" data-toggle="tab">{{ title }}</a></li>
                    {% endfor %}
                </ul>
            </div>
            <div class="smart-widget-body" style="height: 92%;width: 100%;padding: 0px;">
                <div class="tab-content" style="height: 100%;width: 100%;">
                    {% for i,detail in detailArr %}
                        <div {% if loop.first %} class="tab-pane fade in active"  {% else %} class="tab-pane fade " {% endif %}  id="style3Tab{{ i }}" style="height:100%;width: 100%;overflow-y: scroll;">
                            <table class="table table-hover" nodeId="{{ detail['id'] }}" month="{{ detail['month'] }}" schoolId="{{ detail['schoolId'] }}" style="margin-bottom: 0px;">
                                <tbody>
                                <tr class="info">
                                    <th style="width: 160px;">类型</th>
                                    <th style="width: 80px;">最大得分</th>
                                    <th style="width: 130px;">数据</th>
                                    <th style="width: 60px;">原始分</th>
                                    <th style="width: 50px;">得分</th>
                                    <th>操作</th>
                                </tr>
                                {% for key,row in detail['nodes'] %}
                                    <tr>
                                        {% if row['sTag'] == 'tchUse' or row['sTag'] == 'runExamine' or row['sTag'] == 'activity'  or row['sTag'] == 'tchShare' or row['sTag'] == 'exCase' or row['sTag'] == 'runCase'%}
                                            <td sTag="{{ row['sTag'] }}" title="{{ row['mStandard'] }}">{% if row['bLock'] == 1 %}<i class="fa fa-lock"></i>{% endif %}<a style="float:left;" class="clickable" nodeId ="{{ row['iSSNId'] }}">&nbsp;&nbsp;<i class="glyphicon glyphicon-new-window	"></i>&nbsp;{{ row['sName'] }}</a></td>
                                        {% else %}
                                            <td sTag="{{ row['sTag'] }}" title="{{ row['mStandard'] }} ">{% if row['bLock'] == 1  %}<i class="fa fa-lock"></i>{% endif %}<span style="float:left;">&nbsp;&nbsp;{{ row['sName'] }}</span></td>
                                        {% endif %}
                                        <td>{{ row['iMaxGrade'] }}</td>
                                        <td>{{ row['sRealData'] }}</td>
                                        <td>{{ row['iCopyGrade'] }}</td>
                                        <td id="grade_{{ row['iSSNId'] }}">{{ row['iGrade'] }}</td>
                                        <td>
                                            {#{% if row['bLock'] == 1 and isAdmin == false %}#}
                                                {#已锁定#}
                                                {#<a class="unlock" nodeId="{{ row['iSSNId'] }}">解锁</a>#}
                                            {#{% else %}#}
                                                {#{% if isAdmin or hasPower %}#}
                                                    {#<a class="fix" nodeId="{{ row['iSSNId'] }}">修改</a> <a class="lock" nodeId="{{ row['iSSNId'] }}">锁定</a>#}
                                                {#{% endif %}#}
                                            {#{% endif %}#}
                                            {% if row['bLock'] == 1 and (hasPower or isAdmin ) %}
                                                <a class="unlock" nodeId="{{ row['iSSNId'] }}">解锁</a>
                                            {% else %}
                                                {% if hasPower %}
                                                    <a class="fix" nodeId="{{ row['iSSNId'] }}">修改</a> <a class="lock" nodeId="{{ row['iSSNId'] }}">锁定</a>
                                                {% endif %}
                                            {% endif %}
                                        </td>
                                    </tr>

                                {% endfor %}
                                <tr>
                                    <td>总分</td>
                                    <td colspan="3">{{ detail['totalGrade'] }}</td>
                                    <td colspan="2">{% if isAdmin or hasPower %}<a id="lockAll">一键锁定</a>{% endif %}</td>
                                </tr>
                                {% if detail['lastTime'] is defined %}
                                    <tr>
                                        <td colspan="6" style="font-size: 12px;text-align: right;padding-right: 10px;">截止时间：{{ detail['lastTime'] }}</td>
                                    </tr>
                                {% endif %}
                                </tbody>
                            </table>

                        </div>
                    {% endfor %}
                </div><!-- ./tab-content -->
            </div>
        </div>
    </div>
{% endif %}


{% if showBack is defined  %}
    {{ showBack }}
{% endif %}

<script>
    var schId = '{{ detail['schoolId'] }}';
    var schName = '{{ detail['schoolName'] }}';
</script>
